#ifndef _NE_MOUSE_H_
#define _NE_MOUSE_H_

#include <mathematics/Vector2.h>

namespace ne
{
    enum MouseButton
    {
        MB_NONE_BUTTON   = 0x00,
        MB_LEFT_BUTTON   = 0x01,
        MB_MIDDLE_BUTTON = 0x02,
        MB_RIGHT_BUTTON  = 0x04,
        MB_BUTTON3       = 0x08,
        MB_BUTTON4       = 0x10,
        MB_BUTTON5       = 0x20,
        MB_BUTTON6       = 0x40,
        MB_BUTTON7       = 0x80
    };

    class NEAPI Mouse
    {
        public:
            Mouse();

            void setPosition(const Vector2 &v);
            Vector2 getPosition() const;

            void setPosition(const real x, const real y);
            void getPosition(real &x, real &y) const;

            void setButtonUp(const MouseButton button);
            bool isButtonUp(const MouseButton button) const;

            void setButtonDown(const MouseButton button);
            bool isButtonDown(const MouseButton button) const;

            uint32_t getButtonsDown() const;

            void setWheelVariation(const real v);
            real getWheelVariation() const;

            void reset();

            ~Mouse();

        private:
            Mouse(const Mouse &);

            Mouse& operator = (const Mouse &);

        public:
            static const uint32_t MAX_MOUSE_BUTTONS;

        private:
            Vector2 mPosition;
            real mWheelVariation;
            uint32_t mButtonsDown;

    };
}

#endif
